//
//  DHPriceSceCell.m
//  精品酒店
//
//  Created by DIANGHONG on 2018/5/14.
//  Copyright © 2018年 DIANGHONG. All rights reserved.
//

#import "DHPriceSceCell.h"
@interface DHPriceSceCell()<UITextFieldDelegate>
@property (weak, nonatomic) IBOutlet UITextField *lowPriceTextFiled;
@property (weak, nonatomic) IBOutlet UITextField *highPriceTextFiled;

@end
@implementation DHPriceSceCell


- (void)awakeFromNib
{
    [super awakeFromNib];
    self.lowPriceTextFiled.delegate = self;
    self.highPriceTextFiled.delegate = self;
}
#pragma mark: - UITextFieldDelegate
- (void)textFieldDidEndEditing:(UITextField *)textField
{
    if (textField == self.lowPriceTextFiled)
    {
        [self.delegate priceSceCellLowPrice:self lowPrice:textField.text];
    }else{
        [self.delegate priceSceCellHighPrice:self highPrice:textField.text];
    }
}
#pragma mark: - touchesBegan
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
    [self endEditing:true];
}
@end
